package com.xintoucloud.pbs.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.xintoucloud.pbs.entity.Organization;
import com.xintoucloud.pbs.model.OrganizationInformationDto;
import com.xintoucloud.pbs.model.OrganizationNode;
import com.xintoucloud.pbs.model.TreeData;
import com.xintoucloud.pbs.model.TreeNode;

@Service
public interface OrganizationService {
	/**
	 * 根据上级组织id列出组织架构
	 * @param oid
	 * @return
	 */
	List<OrganizationNode> listOrganizationByParentId(Integer parentId);
	
	Organization getOne(Integer oid);

	/**
	 * 根据上级组织id列出组织架构
	 * @param oid
	 * @return
	 */
	TreeData getTreeData(Integer parentId);
	/**
	 * 
	 * @param parentId
	 * @return
	 */
	List<TreeNode> listTreeNode(Integer parentId);
	/**
	 * 根据id删除组织树节点
	 * @param oid
	 * @return
	 */
	boolean deleteById(int oid);
	/**
	 * 
	 * @param organization
	 * @return
	 */
	Organization saveOrganization(int parentId,String oName);
	/**
	 * 修改组织树节点的信息
	 * @param oid
	 * @return
	 */
	TreeNode updateOrganization(int oid,String oName);
	/**
	 * 查询组织信息
	 * @param oid
	 * @return
	 */
	OrganizationInformationDto showOrganizationInformation(int oid);
	/**
	 * 更新操作
	 * @param org
	 */
	void updateOrganization(Organization org);
	/**
	 * 显示党建地图
	 * @return
	 */
	List<String> showOrganizationMap();
}
